package threadcoreknowledge.createthreads.wrongways;

/**
 * 3.匿名内部类创建线程
 * @ClassName AnonymousInnerClassDemo
 *  匿名内部类创建线程
 * @Author wushaopei
 * @Date 2021/2/25 8:42
 * @Version 1.0
 */
public class AnonymousInnerClassDemo {

    public static void main(String[] args) {
        new Thread(){
            @Override
            public void run(){
                System.out.println(Thread.currentThread().getName());
            }
        }.start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        }).start();

    }
}
